﻿<UserControl x:Class="Blacklight.Showcase.Samples.RangeSliderSample"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:controls="clr-namespace:Blacklight.Controls;assembly=Blacklight.Controls"
    >

    <UserControl.Resources>

        <controls:ResourceDictionaryManager x:Key="ResourceDictionaryManager">
            <controls:ResourceDictionaryManager.ResourceDictionaries>
                <controls:ResourceDictionaryCollection>

                    <controls:ResourceDictionary Path="/Blacklight.Showcase;component/ResourceDictionaries/DavesGlossyControls.xaml">
                        <controls:ResourceDictionary.ResourceKeys>
                            <controls:ResourceKeyCollection>
                                <controls:ResourceKey ResourceName="GlossyBlackSlider" />
                            </controls:ResourceKeyCollection>
                        </controls:ResourceDictionary.ResourceKeys>
                    </controls:ResourceDictionary>

                </controls:ResourceDictionaryCollection>
            </controls:ResourceDictionaryManager.ResourceDictionaries>
        </controls:ResourceDictionaryManager>

    </UserControl.Resources>

    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <TextBlock Foreground="#ffffffff" FontSize="14" FontFamily="Verdana" Margin="5" Grid.Row="0"
                   Text="Minimum" VerticalAlignment="Center" />
        <TextBox  Grid.Column="1" Grid.Row="0" VerticalAlignment="Center"  Width="80" Margin="10,5,10,5" FontSize="14" FontFamily="Verdana" Text="0" x:Name="minimum" />
        <TextBlock Foreground="#ffffffff" FontSize="12" FontFamily="Verdana" Margin="5" Grid.Row="0" Grid.Column="2" TextWrapping="Wrap"
                   Text="(The minimum value for the slider)" VerticalAlignment="Center" />


        <TextBlock Foreground="#ffffffff" FontSize="14" FontFamily="Verdana" Margin="5" Grid.Row="1"
                   Text="Maximum" VerticalAlignment="Center" />
        <TextBox  Grid.Column="1" Grid.Row="1" VerticalAlignment="Center"  Width="80" Margin="10,5,10,5" FontSize="14" FontFamily="Verdana" Text="1" x:Name="maximum" />
        <TextBlock Foreground="#ffffffff" FontSize="12" FontFamily="Verdana" Margin="5" Grid.Row="1" Grid.Column="2" TextWrapping="Wrap"
                   Text="(The maximum value for the slider)" VerticalAlignment="Center" />
        
        <TextBlock Foreground="#ffffffff" FontSize="14" FontFamily="Verdana" Margin="5" Grid.Row="2"
                   Text="Minimum Range Span" VerticalAlignment="Center" />
        <TextBox  Grid.Column="1" Grid.Row="2" VerticalAlignment="Center"  Width="80" Margin="10,5,10,5" FontSize="14" FontFamily="Verdana" Text="0.25" x:Name="minimumRangeSpan" />
        <TextBlock Foreground="#ffffffff" FontSize="12" FontFamily="Verdana" Margin="5" Grid.Row="2" Grid.Column="2" TextWrapping="Wrap"
                   Text="(The minimum range size the slider can span)" VerticalAlignment="Center" />

        <Border CornerRadius="10" Background="#ffffffff" Grid.Row="4" Grid.ColumnSpan="3" Margin="0,15,0,0">
            <StackPanel Margin="25">
                <controls:RangeSlider x:Name="rangeSlider" Minimum="0" Maximum="1" MinimumRangeSpan="0.25" />
                <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
                    <TextBlock Text="Selected range: " FontFamily="Verdana" FontSize="14" />
                    <TextBlock Text="{Binding ElementName=rangeSlider, Path=RangeStart}" FontFamily="Verdana" FontSize="14" FontWeight="Bold" />
                    <TextBlock Text=" to " FontFamily="Verdana" FontSize="14" />
                    <TextBlock Text="{Binding ElementName=rangeSlider, Path=RangeEnd}" FontFamily="Verdana" FontSize="14" FontWeight="Bold" />
                </StackPanel>
            </StackPanel>

        </Border>

    </Grid>
</UserControl>
